<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>人员信息显示</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            margin: 20px;
        }
        table {
            width: 100%;
            border-collapse: collapse;
        }
        th, td {
            border: 1px solid #ddd;
            padding: 8px;
            text-align: left;
        }
        th {
            background-color: #f2f2f2;
        }
        a {
            text-decoration: none;
            color: blue;
        }
    </style>
</head>
<body>
    <h1>人员信息列表</h1>
    <table>
        <thead>
            <tr>
                <th>用户名称</th>
                <th>性别</th>
                <th>密码</th>
                <th>操作</th>
            </tr>
        </thead>
        <tbody>
            <tr th:each="user:${list}">
                <td th:text="${user.username}"></td>
                <td th:text="${user.sex}"></td>
                <td th:text="${user.pwd}"></td>
                <td>
                    <a th:href="@{/data.do(id=${user.id},flag='data')}">编辑</a>
                    |
                    <a th:href="@{/del.do(id=${user.id},flag='del')}">删除</a>
                </td>
            </tr>
        </tbody>
    </table>
    <br>
    <a href="save.html">添加新用户</a>
</body>
</html>